package com.taxi.driver.module.main.home;

import com.taxi.driver.common.i.IBasePresenter;
import com.taxi.driver.common.i.IBaseView;
import com.taxi.driver.data.entity.OrderHomeStatusEntity;
import com.taxi.driver.module.vo.HomePageVO;
import com.taxi.driver.module.vo.MessageVO;
import com.taxi.driver.module.vo.OrderSummaryVO;
import com.taxi.driver.socket.SocketData;

import java.util.List;

/**
 * 功能描述："订单、收入、消息"展示层Contract
 */
public interface HomeContract {

    interface View extends IBaseView<Presenter> {

        void setList(List<MessageVO> vos);

        void setListFailed();

        void appendList(List<MessageVO> vos);

        void deleteSuccess(int position);

        /**
         * 显示信息
         *
         * @param vo
         */
        void showHomePageInfo(HomePageVO vo);

        void openOrderOngoing(String orderUuid);

        void openOrderDetail(String orderUuid);

        void showNetworkNotice(boolean disconnect);

        void showSocketNotice(boolean socket);

        void showLocationNotice(boolean location);

        void showHomeStatus(OrderHomeStatusEntity entity);

        void appointmentList(List<OrderSummaryVO> vos);

        void orderCancelled(SocketData data);

        void orderChangedToOther(SocketData data);

        void reassign();//订单被改派

        void showOrderPool(int num);

        void showBall(boolean show);
    }

    interface Presenter extends IBasePresenter {

        void onCreate();

        void onDestory();

        void refresh();

        void cancelRefresh();

        void loadMore();

        void deleteMsg(int position, String uuid);

        /**
         * 获取“订单/收入等”信息
         */
        void reqWorkInfo();

        void getAppointmentList();

        /**
         * 获取首页订单状态
         */
        void reqHomeStatus();

        void reqOrderDetail(String orderUuid);

        /**
         * 司机类型
         *
         * @return
         */
        int driverType();

        void canGrapOrders();
    }
}
